home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d14 / cxlxplod.arc / WXCLOSE.C < prev    next >
Text File  |  1989-06-11  |  669b  |  30 lines

  1. #include <stdlib.h>
  2. #include "cxlwin.h"
  3. #include "cxlxwin.h"
  4.  
  5. /*---------------------------------------------------------------------------*/
  6. /* this function closes the exploding windows */
  7. wxclose()
  8. {
  9.   struct _wxrec_t *wxrec;
  10.  
  11.   if (!_wxinfo.total) return(W_NOACTIVE);
  12.  
  13.   while (_wxinfo.active->wxnum--)
  14.       {
  15.        wclose();
  16.        sound_(_wxinfo.active->wxtone,1);
  17.        _wxinfo.active->wxtone -= 100;
  18.       }
  19.   _wxinfo.total--;
  20.   wxrec=_wxinfo.active->prev;
  21.   free(_wxinfo.active);
  22.   _wxinfo.active=wxrec;
  23.   if(_wxinfo.active!=NULL) _wxinfo.active->next=NULL;
  24.  
  25.     /* return normally */
  26.     return(_winfo.errno=W_NOERROR);
  27.  
  28. }  
  29.  
  30.